chore(opencode): exclude .map files from CLI binary build#25500
Merged
thdxr merged 1 commit intoanomalyco:devfrom May 3, 2026
Conversation
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
f215436 to
60808b8
Compare
The CLI build embeds all web UI assets including 25MB of JavaScript source maps (.map files). These are only used for Sentry uploads in the hosted deployment — dead weight in a compiled Bun binary. One-line filter in build.ts's glob excludes .map files from embedding. Experiments: anomalyco#2 Metric: size_kb 167,666 → 143,658 (-14.3%)
60808b8 to
4841539
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #25504
Type of change
What does this PR do?
The CLI build embeds all web UI dist files via a catch-all
Bun.Glob("**/*")inbuild.ts. This catches.mapsource map files that are only needed for Sentry uploads in the hosted deployment. They are dead weight in a compiled Bun binary.Adds a
.filter()to skip.mapfiles, saving ~24MB (167MB → 144MB).How did you verify your code works?
bun run build --single— binary compiles and passes smoke test (opencode --version)opencode serveserves the web UI correctly without the embedded source mapsScreenshots / recordings
N/A — no UI changes.
Checklist